<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>代理中心</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css">
    <link rel="stylesheet" type="text/css" href="../css/aui-slide.css">
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css">
    <link rel="stylesheet" type="text/css" href="../css/my.css">
    <link rel="stylesheet" type="text/css" href="../css/index.css">
    <style>
        #header {
            background: #fff;
        }

        #header .aui-bar {
            background: transparent;
            color: #000;
            border-bottom: 1px solid #ccc;
        }

        #header .aui-bar .aui-btn .aui-icon-left {
            color: #000;
        }
        .top{
            height: 8rem;
            padding: 10px;
        }
        .top > div {
            background: linear-gradient(#fb585d, #f77c5b);
            border-radius: 10px;
            width: 100%;
            height: 100%;
        }
        .top_up{
            width: 100%;
            height: 50%;
            border-bottom: 1px solid #fff;
            display: flex;
            justify-content:space-between;
            align-items: center;
            padding: 5px 10px;
            color: #fff;
            font-size: 14px;
        }
        .top_up>div {
            display: flex;
            align-items: center;
        }
        .top_up img{
            margin-right: 5px;
            width: 30px;
            height: 30px;
            overflow: hidden;
            border-radius: 50%;
        }
        .top_up>img{
            width: 40px;
            height: 40px;
            overflow: hidden;
            border-radius: 50%;
        }
        #userType{
            margin-left: 5px;
            border-radius: 10px;
            padding: 2px 5px;
            background: #000;
        }
        .top_down{
            display: flex;
            justify-content:center;
            align-items: center;
        }
        .top_down div{
            overflow: hidden;
            width: 100%;
            text-align: center;
            font-size: 14px;
            color:#fff;
        }
        #income,#order,#fans{
            font-size: 20px;
            margin: 5px 0;
        }
        .title{
            width: 100%;
            text-align: center;
            padding: 7px;
        }
        .equity{
            width: 100%;
            height: 12rem;
            padding: 10px;
            display: flex;
            justify-content:space-around;
            align-items: center;
        }
        .equity>div{
            font-size: 14px;
            color:#ccc;
            display: flex;
            flex-direction:column;
            align-items: center;
        }
        #proportionOne,#proportionTwo {
            background: linear-gradient(#fb585d, #f77c5b);
            font-size: 20px;
            color:#fff;
            height: 7rem;
            width: 7rem;
            border-radius: 50%;
            border: 5px solid #fcb3ac;
            text-align: center;
            line-height: 6.5rem;
            margin-bottom: 10px;
        }
        .aui-col-xs-4{
            display: flex;
            justify-content: center;
            text-align: center;
        }
        .aui-row img{
            width: 25%;
        }
    </style>
</head>

<body>
    <div>
        <section class="aui-grid aui-margin-b-15">
            <div class="top">
                <div>
                    <div class="top_up">
                        <div>
                            <img id="headimgurl" src="../image/agent_center_baobiao.png" />
                            <div>
                                <div>
                                    <span id="nickname">---</span>
                                    <span id="leval_text">---</span>
                                </div>
                                <div>
                                    <span>到期时间</span>
                                    ：
                                    <span id="leval_end_time">永久有效</span>
                                </div>
                            </div>
                        </div>
                        <img src="../image/agent_center_baobiao.png" />
                    </div>
                    <div class="top_down aui-padded-t-10">
                        <div>
                            <div id="total_money">0.00</div>
                            <div>累计收入</div>
                        </div>
                        <div>
                            <div id="total_order">0</div>
                            <div>累计订单</div>
                        </div>
                        <div>
                            <div id="total_fans">0</div>
                            <div>累计粉丝</div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <section class="aui-grid aui-margin-b-15">
            <div class="title">常用工具</div>
            <div class="aui-row">
                <div class="aui-col-xs-4" onclick="openPublic(this)" data-frame="shouru_frm" data-title="收入报表" tapmode>
                    <i class="aui-iconfont"><img src="../image/agent/bb.png" class="aui-img1" /></i>
                    <div class="aui-grid-label">收益报表</div>
                </div>
                <div class="aui-col-xs-4" onclick="openPublic(this)" data-frame="order_frm" data-title="粉丝订单" data-other="9" tapmode>
                    <i class="aui-iconfont"><img src="../image/agent/dd.png" class="aui-img1" /></i>
                    <div class="aui-grid-label">粉丝订单</div>
                </div>
                <div class="aui-col-xs-4" onclick="openPublic(this)" data-other="0" data-frame="team_frm" data-title="我的团队" tapmode >
                    <i class="aui-iconfont"><img src="../image/agent/fs.png" class="aui-img1" /></i>
                    <div class="aui-grid-label">团队粉丝</div>
                </div>
                <div class="aui-col-xs-4" onclick="openPublic(this)" data-frame="share_friend_frm" data-title="邀请分享" tapmode>
                    <i class="aui-iconfont aui-icon-share"></i>
                    <div class="aui-grid-label">邀请分享</div>
                </div>
                <div class="aui-col-xs-4" onclick="openPublic(this)" data-frame="wallet_frm" data-title="我的钱包" tapmode>
                    <i class="aui-iconfont"><img src="../image/agent/qb.png" class="aui-img1" /></i>
                    <div class="aui-grid-label">我的钱包</div>
                </div>
                <div class="aui-col-xs-4" onclick="zhichi()" data-url="" data-title="联系客服" id="kf" tapmode>
                    <i class="aui-iconfont"><img src="../image/agent/kf.png" class="aui-img1" /></i>
                    <div class="aui-grid-label">联系客服</div>
                </div>
            </div>
        </section>
        <section class="aui-grid aui-margin-b-15">
            <div class="title">您享有的权益</div>
            <div class="equity">
                <div>
                    <div id="proportionOne"><span id="rate_zigou">0</span>%</div>
                    <div>自购或分享&nbsp;享受佣金比例</div>
                </div>
                <div>
                    <div id="proportionTwo"><span id="rate_fenyong">0</span>%</div>
                    <div>多级分层&nbsp;享受佣金比例</div>
                </div>
            </div>
        </section>
    </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js" ></script>
<script type="text/javascript" src="../script/common.js" ></script>
<script type="text/javascript">
    apiready = function(){
        api.parseTapmode();
        getData();
    }
    function getData(){
        _loading2();
        _Ajax(window.APIServer.Agent,'post',{},'json',function(ret){
            _loading2_close();
            if (ret.code==1) {
                $('#nickname').html(ret.data.nickname);
                if (ret.data.headimgurl!='') {
                    $('#headimgurl').attr('src',ret.data.headimgurl);
                }
                $('#leval_text').html(ret.data.leval_text);
                $('#total_money').html(ret.data.total_money);
                $('#total_order').html(ret.data.total_order);
                $('#total_fans').html(ret.data.total_fans);
                $('#kf').attr('data-url',ret.data.app_kf_url);
                $('#rate_zigou').html(ret.data.rate_zigou);
                $('#rate_fenyong').html(ret.data.rate_fenyong);
                $('#leval_end_time').html(ret.data.leval_end_time);
            }else{
                _toast('拉取信息失败');
            }
        })
    }
</script>

</html>
